@extends('admin.layouts.master')
@section('css')
    <link rel="stylesheet" href="{{asset('/css/admin/order_show.css')}}">
@endsection
@section('content')
    <div class="main_header clearfix">

        <div class="main_header_show clearfix">
            <span><a style="color:white;font-size: 18px" href="{{url('/admin/order')}}">订单管理</a><span style="color:white;font-size: 18px">&nbsp;&nbsp;>&nbsp;&nbsp;订单详情</span></span>
        </div>
    </div>
    <div class="main_form clearfix">
        <div class="main_order clearfix">
            <div class="main_order_header clearfix">
                <div class="main_order_num">
                    <p>
                       <span>订单编号:</span>
                       <span>{{$orders->order_num}}</span>
                    </p>
                </div>
                <div class="main_order_status">
                       <p>
                           <span>订单状态:</span>
                           <span>
                               @if($orders->state==0)
                               <i style="color: red; text-decoration: none; font-style:normal">未支付</i>
                                   @else
                               <i style="text-decoration: none; font-style:normal">已支付</i>
                              @endif
                           </span>
                       </p>
                </div>
            </div>
            <div class="main_order_detail clearfix">
               <div class="main_order_dian">
                   <p>
                       <span>店铺名称:</span>
                       <span>{{$orders->shop_name}}</span>
                    </p>
               </div>
               <div class="main_order_user">
                   <p>
                       <span>下单用户:</span>
                       <span>{{$orders->name}}</span>
                    </p>
               </div>
               <div class="main_order_total">
                   <p>
                       <span>总价:</span>
                       <span>{{$orders->total}}元</span>
                    </p>
               </div>
               <div class="main_order_ordertime">
                   <p>
                       <span>下单时间:</span>
                       <span>{{$orders->created_at}}</span>
                    </p>
               </div>
            </div>
        </div>
       <!-- 订单的商品详细列表=主体表格部分 -->
        <div class="order_goodslist clearfix">
           <div class="order_product">
            <span>商品列表</span>
           </div>
        </div>
        <!-- 主要的表格区 -->
     <div class="main_formlist clearfix">
                <table class="table table-bordered main_table">
                    <tbody>
                    <tr>
                        <th>商品名称</th>
                        <th>货号</th>
                        <th>RFID码</th>
                        <th>商品单价</th>
                    </tr>
                    @foreach( $glists as $glist)
                      <tr>
                          <td>{{$glist->name}}</td>
                          <td>{{$glist->product_code}}</td>
                          <td>{{$glist->rfid}}</td>
                          <td>{{$glist->price}}元</td>
                      </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
            <div class="boot_fenye">
                <div class="boot_page">
                    <div class="boot_page_di">第<span class="">{{ $page = isset($_GET['page'])?$_GET['page']:1}}</span>页
                    </div>
                    <div  class="boot_page_total">共<span>{{$total_page}}</span>页
                    </div>
                <div class="boot_choose">
                    {{$glists->render()}}
                </div>
            </div>
        </div>

@endsection